Required packages for analysis
#install.packages("covid19.analytics")
#install.packages("devtools")
devtools::install_github("mponce0/covid19.analytics")
## Downloading GitHub repo mponce0/covid19.analytics@master
library(covid19.analytics)
To obtain all the records combined for “confirmed”, “deaths” and “recovered” cases – aggregated data
covid19.data.ALLcases <- covid19.data()
To obtain time series data for “confirmed” cases
covid19.confirmed.cases <- covid19.data("ts-confirmed")
Reads all possible datasets, returning a list
covid19.all.datasets <- covid19.data("ALL")
Reads the latest aggregated data
covid19.ALL.agg.cases <- covid19.data("aggregated")
Reads time series data for casualties
covid19.TS.deaths <- covid19.data("ts-deaths")
To obtain covid19’s genomic data
covid19.gen.seq <- covid19.genomic.data()
To display the actual RNA seq
covid19.gen.seq$NC_045512.2
report.summary()
## Data being read from JHU/CCSE repository
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv
## Data retrieved on 2020-08-31 20:32:08 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 266
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Data being read from JHU/CCSE repository
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv
## Data retrieved on 2020-08-31 20:32:09 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 266
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Data being read from JHU/CCSE repository
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv
## Data retrieved on 2020-08-31 20:32:10 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 253
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Data being read from JHU/CCSE repository
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/08-30-2020.csv
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## Possible <<Aggregated data-type>> detected...
## checking for ... Active Deaths Recovered Confirmed
## No critical issues have been found.
## *** 14 entries were removed due to data inconsistences
## >>> checking data consistency...
## This function applies to TimeSeries data only
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## Possible <<Aggregated data-type>> detected...
## checking for ... Active Deaths Recovered Confirmed
## No critical issues have been found.
Save the tables into a text file named ‘covid19-SummaryReport_CURRENTDATE.txt’ where CURRRENTDATE is the actual date
report.summary(saveReport=TRUE)
## Data being read from JHU/CCSE repository
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv
## Data retrieved on 2020-08-31 20:32:13 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 266
## --------------------------------------------------------------------------------
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Warning in consistency.check(data, n0, nf, datasetName, details = details, :
## Inconsistency of type.II in ts-confirmed data detected -- 47 records (out of
## 266) show inconsistencies in the data...
## ################################################################################
## ##### TS-CONFIRMED Cases -- Data dated: 2020-08-30 :: 2020-08-31 20:32:13
## ################################################################################
## Number of Countries/Regions reported: 188
## Number of Cities/Provinces reported: 82
## Unique number of distinct geographical locations combined: 266
## --------------------------------------------------------------------------------
## Worldwide ts-confirmed Totals: 25222709
## --------------------------------------------------------------------------------
## Country.Region Province.State Totals GlobalPerc LastDayChange t-2 t-3 t-7 t-14 t-30
## 1 US 5996431 23.77 35337 47153 46156 37891 35112 58485
## 2 Brazil 3862311 15.31 16158 41350 43412 17078 19373 45392
## 3 India 3621245 14.36 78512 78761 76472 60975 55018 54735
## 4 Russia 987470 3.92 4897 4843 4758 4688 4839 5429
## 5 Peru 639435 2.54 9474 7964 8619 9090 10143 0
## 6 South Africa 625056 2.48 2505 2419 1846 1677 2541 10107
## 7 Colombia 607904 2.41 8020 9392 8497 10549 8328 10673
## 8 Mexico 595841 2.36 4129 5974 5824 3541 3571 9556
## 9 Spain 439286 1.74 0 0 9779 19382 16269 0
## 10 Chile 409974 1.63 1965 2037 1870 1903 1556 1991
## --------------------------------------------------------------------------------
## Global Perc. Average: 0.38 (sd: 1.98)
## Global Perc. Average in top 10 : 7.05 (sd: 7.84)
## --------------------------------------------------------------------------------
## ================================================================================
## Data being read from JHU/CCSE repository
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv
## Data retrieved on 2020-08-31 20:32:14 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 266
## --------------------------------------------------------------------------------
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Warning in consistency.check(data, n0, nf, datasetName, details = details, :
## Inconsistency of type.II in ts-deaths data detected -- 35 records (out of 266)
## show inconsistencies in the data...
## ################################################################################
## ##### TS-DEATHS Cases -- Data dated: 2020-08-30 :: 2020-08-31 20:32:15
## ################################################################################
## Number of Countries/Regions reported: 188
## Number of Cities/Provinces reported: 82
## Unique number of distinct geographical locations combined: 266
## --------------------------------------------------------------------------------
## Worldwide ts-deaths Totals: 846395
## --------------------------------------------------------------------------------
## Country.Region Province.State Totals Perc LastDayChange t-2 t-3 t-7 t-14 t-30
## 1 US 183066 3.05 305 961 976 445 445 1111
## 2 Brazil 120828 3.13 566 758 855 565 684 1088
## 3 India 64469 1.78 971 948 1021 848 876 853
## 4 Mexico 64158 10.77 339 673 552 320 266 784
## 5 United Kingdom 41499 12.41 1 12 9 4 3 13
## 6 Italy 35477 13.23 4 1 9 4 4 5
## 7 France 30470 10.18 10 0 19 14 23 0
## 8 Spain 29011 6.60 0 0 15 34 29 0
## 9 Peru 28607 4.47 136 194 153 210 206 0
## 10 Iran 21462 5.75 103 110 112 133 165 216
## --------------------------------------------------------------------------------
## --------------------------------------------------------------------------------
## ================================================================================
## Data being read from JHU/CCSE repository
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv
## Data retrieved on 2020-08-31 20:32:15 || Range of dates on data: 2020-01-22--2020-08-30 | Nbr of records: 253
## --------------------------------------------------------------------------------
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## >>> checking data consistency...
## Warning in consistency.check(data, n0, nf, datasetName, details = details, :
## Inconsistency of type.II in ts-recovered data detected -- 69 records (out of
## 253) show inconsistencies in the data...
## ################################################################################
## ##### TS-RECOVERED Cases -- Data dated: 2020-08-30 :: 2020-08-31 20:32:16
## ################################################################################
## Number of Countries/Regions reported: 188
## Number of Cities/Provinces reported: 68
## Unique number of distinct geographical locations combined: 253
## --------------------------------------------------------------------------------
## Worldwide ts-recovered Totals: 16618168
## --------------------------------------------------------------------------------
## Country.Region Province.State Totals LastDayChange t-2 t-3 t-7 t-14 t-30
## 1 Brazil 3237615 35430 43402 35937 28472 44063 29128
## 2 India 2774801 60868 64935 65050 66550 57829 51255
## 3 US 2153939 13325 22247 17041 23013 32513 23725
## 4 Russia 804941 2576 5867 5869 2451 3129 8099
## 5 South Africa 538604 1910 2759 2597 10024 5294 16290
## 6 Mexico 489724 5441 4513 4238 8086 6542 7752
## 7 Colombia 450609 10047 10954 11827 10141 14089 6321
## 8 Peru 446675 8658 8355 7785 0 5350 3212
## 9 Chile 382584 1401 1731 1530 1285 1557 2180
## 10 Iran 321421 1574 1577 1632 1901 1671 2311
## --------------------------------------------------------------------------------
## --------------------------------------------------------------------------------
## ================================================================================
## Data being read from JHU/CCSE repository
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/08-30-2020.csv
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## Possible <<Aggregated data-type>> detected...
## checking for ... Active Deaths Recovered Confirmed
## No critical issues have been found.
## Warning in chck.cols.qty(agg.critical.cols, data, disclose = disclose): Column Active has 4 entries reporting negative values!
## on entries: 471 1426 1871 3068
## Warning in chck.cols.qty(agg.critical.cols, data, disclose = disclose): number of 'active+recovered+deaths' cases does NOT match the number of 'confirmed' cases!
## on 10 entries -- 164 199 324 362 405 1313 1588 1846 2777 2877
## || FIPS Admin2 Province_State Country_Region Last_Update Lat Long_ Confirmed Deaths Recovered Active Combined_Key Incidence_Rate Case.Fatality_Ratio
## 164 199 324 362 405 1313 1588 1846 2777 2877 || c(NA, NA, NA, NA, NA, 80017, 20099, 90023, 39125, 90040) c("", "", "", "", "", "Out of IL", "Labette", "Unassigned", "Paulding", "Unassigned") c("Vichada", "Saint Pierre and Miquelon", "Nagasaki", "", "", "Illinois", "Kansas", "Maine", "Ohio", "Oklahoma") c("Colombia", "France", "Japan", "Luxembourg", "Monaco", "US", "US", "US", "US", "US") c("2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27", "2020-08-31 04:28:27") c(4.4234, 46.8852, 33.235712, 49.8153, 43.7333, NA, 37.19113093, NA, 41.11676341, NA) c(-69.2878, -56.3159, 129.608033, 6.1296, 7.4167, NA, -95.29849679, NA, -84.5801017, NA) c(21, 5, 229, 6625, 154, 2, 183, 3, 79, 103) c(1, 0, 3, 124, 4, 0, 1, 0, 1, 0) c(5, 1, 36, 7140, 116, 0, 0, 0, 0, 0) c(36, 1, 47, 6549, 41, 0, 180, 1, 81, 4) c("Vichada, Colombia", "Saint Pierre and Miquelon, France", "Nagasaki, Japan", "Luxembourg", "Monaco", "Out of IL, Illinois, US", "Labette, Kansas, US", "Unassigned, Maine, US", "Paulding, Ohio, US", "Unassigned, Oklahoma, US") c(51.0166221430691, 86.2812769628991, 17.3385479644545, 1066.01531049114, 333.808989909286, NA, 932.816800897135, NA, 433.804627249357, NA) c(4.76190476190476, 0, 1.31004366812227, 1.87169811320755, 2.5974025974026, 0, 0.546448087431694, 0, 1.26582278481013, 0)
## *** 14 entries were removed due to data inconsistences
## >>> checking data consistency...
## This function applies to TimeSeries data only
## ############################################################################################################################################
## ##### AGGREGATED Data -- ORDERED BY CONFIRMED Cases -- Data dated: 2020-08-31 :: 2020-08-31 20:32:16
## ############################################################################################################################################
## Number of Countries/Regions reported: 186
## Number of Cities/Provinces reported: 559
## Unique number of distinct geographical locations combined: 3936
## --------------------------------------------------------------------------------------------------------------------------------------------
## Location Confirmed Perc.Confirmed Deaths Perc.Deaths Recovered Perc.Recovered Active Perc.Active
## 1 Sao Paulo, Brazil 803404 3.19 29978 3.73 625203 77.82 148223 18.45
## 2 Maharashtra, India 780689 3.10 24399 3.13 562401 72.04 193889 24.84
## 3 South Africa 625056 2.48 14028 2.24 538604 86.17 72424 11.59
## 4 Andhra Pradesh, India 424767 1.68 3884 0.91 321754 75.75 99129 23.34
## 5 Tamil Nadu, India 422085 1.67 7231 1.71 362133 85.80 52721 12.49
## 6 Argentina 408426 1.62 8457 2.07 294007 71.99 105962 25.94
## 7 Iran 373570 1.48 21462 5.75 321421 86.04 30687 8.21
## 8 Karnataka, India 335928 1.33 5589 1.66 242229 72.11 88110 26.23
## 9 Saudi Arabia 314821 1.25 3870 1.23 289667 92.01 21284 6.76
## 10 Bangladesh 310822 1.23 4248 1.37 201907 64.96 104667 33.67
## ============================================================================================================================================
## ############################################################################################################################################
## ##### AGGREGATED Data -- ORDERED BY DEATHS Cases -- Data dated: 2020-08-31 :: 2020-08-31 20:32:16
## ############################################################################################################################################
## Number of Countries/Regions reported: 186
## Number of Cities/Provinces reported: 559
## Unique number of distinct geographical locations combined: 3936
## --------------------------------------------------------------------------------------------------------------------------------------------
## Location Confirmed Perc.Confirmed Deaths Perc.Deaths Recovered Perc.Recovered Active Perc.Active
## 1 England, United Kingdom 288989 1.15 36850 12.75 0 0.00 252139 87.25
## 2 France 299320 1.19 30470 10.18 73279 24.48 195571 65.34
## 3 Sao Paulo, Brazil 803404 3.19 29978 3.73 625203 77.82 148223 18.45
## 4 Maharashtra, India 780689 3.10 24399 3.13 562401 72.04 193889 24.84
## 5 New York City, New York, US 233969 0.93 23689 10.12 0 0.00 210280 89.88
## 6 Iran 373570 1.48 21462 5.75 321421 86.04 30687 8.21
## 7 Lombardia, Italy 99940 0.40 16863 16.87 76248 76.29 6829 6.83
## 8 Rio de Janeiro, Brazil 223302 0.89 16027 7.18 201715 90.33 5560 2.49
## 9 South Africa 625056 2.48 14028 2.24 538604 86.17 72424 11.59
## 10 Lima, Peru 304567 1.21 12668 4.16 0 0.00 291899 95.84
## ============================================================================================================================================
## ############################################################################################################################################
## ##### AGGREGATED Data -- ORDERED BY RECOVERED Cases -- Data dated: 2020-08-31 :: 2020-08-31 20:32:16
## ############################################################################################################################################
## Number of Countries/Regions reported: 186
## Number of Cities/Provinces reported: 559
## Unique number of distinct geographical locations combined: 3936
## --------------------------------------------------------------------------------------------------------------------------------------------
## Location Confirmed Perc.Confirmed Deaths Perc.Deaths Recovered Perc.Recovered Active Perc.Active
## 1 Sao Paulo, Brazil 803404 3.19 29978 3.73 625203 77.82 148223 18.45
## 2 Maharashtra, India 780689 3.10 24399 3.13 562401 72.04 193889 24.84
## 3 South Africa 625056 2.48 14028 2.24 538604 86.17 72424 11.59
## 4 Tamil Nadu, India 422085 1.67 7231 1.71 362133 85.80 52721 12.49
## 5 Andhra Pradesh, India 424767 1.68 3884 0.91 321754 75.75 99129 23.34
## 6 Iran 373570 1.48 21462 5.75 321421 86.04 30687 8.21
## 7 Argentina 408426 1.62 8457 2.07 294007 71.99 105962 25.94
## 8 Saudi Arabia 314821 1.25 3870 1.23 289667 92.01 21284 6.76
## 9 Metropolitana, Chile 273239 1.08 8517 3.12 259943 95.13 4779 1.75
## 10 Turkey 268546 1.07 6326 2.36 243839 90.80 18381 6.84
## ============================================================================================================================================
## ############################################################################################################################################
## ##### AGGREGATED Data -- ORDERED BY ACTIVE Cases -- Data dated: 2020-08-31 :: 2020-08-31 20:32:17
## ############################################################################################################################################
## Number of Countries/Regions reported: 186
## Number of Cities/Provinces reported: 559
## Unique number of distinct geographical locations combined: 3936
## --------------------------------------------------------------------------------------------------------------------------------------------
## Location Confirmed Perc.Confirmed Deaths Perc.Deaths Recovered Perc.Recovered Active Perc.Active
## 1 Lima, Peru 304567 1.21 12668 4.16 0 0.00 291899 95.84
## 2 England, United Kingdom 288989 1.15 36850 12.75 0 0.00 252139 87.25
## 3 Los Angeles, California, US 240749 0.95 5769 2.40 0 0.00 234980 97.60
## 4 New York City, New York, US 233969 0.93 23689 10.12 0 0.00 210280 89.88
## 5 France 299320 1.19 30470 10.18 73279 24.48 195571 65.34
## 6 Maharashtra, India 780689 3.10 24399 3.13 562401 72.04 193889 24.84
## 7 Miami-Dade, Florida, US 156559 0.62 2403 1.53 0 0.00 154156 98.47
## 8 Sao Paulo, Brazil 803404 3.19 29978 3.73 625203 77.82 148223 18.45
## 9 Maricopa, Arizona, US 133641 0.53 2962 2.22 0 0.00 130679 97.78
## 10 Cook, Illinois, US 126003 0.50 5054 4.01 0 0.00 120949 95.99
## ============================================================================================================================================
## Confirmed Deaths Recovered Active
## Totals
## 25215305 846034 14010256 NA
## Average
## 6406.33 214.95 3559.52 NA
## Standard Deviation
## 33365.51 1374.85 25270.64 NA
##
##
## * Statistical estimators computed considering 3936 independent reported entries
## >>> checking data integrity...
## checking for ... Country Province Lat Long
## No critical issues have been found.
## Possible <<Aggregated data-type>> detected...
## checking for ... Active Deaths Recovered Confirmed
## No critical issues have been found.
##
##
## ********************************************************************************
## ******************************** OVERALL SUMMARY********************************
## ********************************************************************************
## **** Time Series Worldwide TOTS ****
## ts-confirmed ts-deaths ts-recovered
## 25222709 846395 16618168
## 3.36% 65.89%
## **** Time Series Worldwide AVGS ****
## ts-confirmed ts-deaths ts-recovered
## 94822.21 3181.94 65684.46
## 3.36% 69.27%
## **** Time Series Worldwide SDS ****
## ts-confirmed ts-deaths ts-recovered
## 498368.72 15234.1 310137.5
## 3.06% 62.23%
##
##
## * Statistical estimators computed considering 266/266/253 independent reported entries per case-type
## ********************************************************************************
## Report saved in covid19-SummaryReport_2020-08-31.txt
Totals for confirmed cases for “Germany, India”
tots.per.location(covid19.confirmed.cases,geo.loc="Germany")
## [1] "GERMANY"
## GERMANY -- 243305
## =============================== running models...===============================
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -49804 -25831 -3583 26784 48555
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13492.23 3983.62 -3.387 0.000837 ***
## x.var 1279.46 30.98 41.305 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 29580 on 220 degrees of freedom
## Multiple R-squared: 0.8858, Adjusted R-squared: 0.8853
## F-statistic: 1706 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8443 -2.0526 0.0925 2.1057 3.3548
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.607112 0.307980 14.96 <2e-16 ***
## x.var 0.047447 0.002395 19.81 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.287 on 220 degrees of freedom
## Multiple R-squared: 0.6408, Adjusted R-squared: 0.6392
## F-statistic: 392.6 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## GLM using Family [1] "poisson" :
##
## Call:
## glm(formula = y.var ~ x.var, family = family)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -307.50 -241.43 -21.13 141.07 215.97
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.033e+01 5.399e-04 19138 <2e-16 ***
## x.var 1.082e-02 3.329e-06 3251 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 19657517 on 221 degrees of freedom
## Residual deviance: 7592929 on 220 degrees of freedom
## AIC: 7595526
##
## Number of Fisher Scoring iterations: 5
##
## --------------------------------------------------------------------------------
tots.per.location(covid19.confirmed.cases,geo.loc="India", confBnd=TRUE)
## [1] "INDIA"
## INDIA -- 3621245
## =============================== running models...===============================
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -620147 -490819 -121787 369042 1791459
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -702712.4 75814.2 -9.269 <2e-16 ***
## x.var 11407.7 589.5 19.351 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 562900 on 220 degrees of freedom
## Multiple R-squared: 0.6299, Adjusted R-squared: 0.6282
## F-statistic: 374.5 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.69811 -1.21814 -0.07388 1.40734 2.07597
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.132410 0.194270 5.829 1.97e-08 ***
## x.var 0.073800 0.001511 48.855 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.442 on 220 degrees of freedom
## Multiple R-squared: 0.9156, Adjusted R-squared: 0.9152
## F-statistic: 2387 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## GLM using Family [1] "poisson" :
##
## Call:
## glm(formula = y.var ~ x.var, family = family)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -343.81 -133.15 -74.02 62.66 138.11
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 7.568e+00 6.134e-04 12337 <2e-16 ***
## x.var 3.473e-02 3.132e-06 11090 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 267563605 on 221 degrees of freedom
## Residual deviance: 3098246 on 220 degrees of freedom
## AIC: 3100713
##
## Number of Fisher Scoring iterations: 4
##
## --------------------------------------------------------------------------------
Read the time series data for all the cases
Run on all the cases in Germany
tots.per.location(all.data,"Germany")
## [1] "GERMANY"
## Processing confirmed cases
## [1] "GERMANY"
## GERMANY -- 243305
## =============================== running models...===============================
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -49804 -25831 -3583 26784 48555
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13492.23 3983.62 -3.387 0.000837 ***
## x.var 1279.46 30.98 41.305 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 29580 on 220 degrees of freedom
## Multiple R-squared: 0.8858, Adjusted R-squared: 0.8853
## F-statistic: 1706 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8443 -2.0526 0.0925 2.1057 3.3548
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.607112 0.307980 14.96 <2e-16 ***
## x.var 0.047447 0.002395 19.81 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.287 on 220 degrees of freedom
## Multiple R-squared: 0.6408, Adjusted R-squared: 0.6392
## F-statistic: 392.6 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## GLM using Family [1] "poisson" :
##
## Call:
## glm(formula = y.var ~ x.var, family = family)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -307.50 -241.43 -21.13 141.07 215.97
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.033e+01 5.399e-04 19138 <2e-16 ***
## x.var 1.082e-02 3.329e-06 3251 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 19657517 on 221 degrees of freedom
## Residual deviance: 7592929 on 220 degrees of freedom
## AIC: 7595526
##
## Number of Fisher Scoring iterations: 5
##
## --------------------------------------------------------------------------------
## Processing death cases
## [1] "GERMANY"
## GERMANY -- 9300
## =============================== running models...===============================
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2443.38 -1323.14 -14.48 1352.36 2436.98
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1127.25 204.42 -5.514 9.78e-08 ***
## x.var 57.98 1.59 36.473 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1518 on 220 degrees of freedom
## Multiple R-squared: 0.8581, Adjusted R-squared: 0.8574
## F-statistic: 1330 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3098 -1.8137 -0.1908 1.9304 3.0967
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.992509 0.271080 3.661 0.000314 ***
## x.var 0.049304 0.002108 23.391 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.013 on 220 degrees of freedom
## Multiple R-squared: 0.7132, Adjusted R-squared: 0.7119
## F-statistic: 547.1 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## GLM using Family [1] "poisson" :
##
## Call:
## glm(formula = y.var ~ x.var, family = family)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -62.17 -49.58 -10.80 31.55 52.29
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 6.948e+00 2.791e-03 2489.3 <2e-16 ***
## x.var 1.211e-02 1.688e-05 717.3 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 985810 on 221 degrees of freedom
## Residual deviance: 380547 on 220 degrees of freedom
## AIC: 382312
##
## Number of Fisher Scoring iterations: 6
##
## --------------------------------------------------------------------------------
## Processing recovered cases
## [1] "GERMANY"
## GERMANY -- 215283
## =============================== running models...===============================
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -46866 -21746 472 22731 39426
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -28949.89 3443.42 -8.407 5.27e-15 ***
## x.var 1227.13 26.78 45.831 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25570 on 220 degrees of freedom
## Multiple R-squared: 0.9052, Adjusted R-squared: 0.9048
## F-statistic: 2100 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## Linear Regression (lm):
##
## Call:
## lm(formula = y.var ~ x.var)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.6480 -2.1237 -0.4617 2.4148 3.8062
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.330878 0.325683 7.157 1.22e-11 ***
## x.var 0.059870 0.002532 23.641 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.418 on 220 degrees of freedom
## Multiple R-squared: 0.7176, Adjusted R-squared: 0.7163
## F-statistic: 558.9 on 1 and 220 DF, p-value: < 2.2e-16
##
## --------------------------------------------------------------------------------
## GLM using Family [1] "poisson" :
##
## Call:
## glm(formula = y.var ~ x.var, family = family)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -282.79 -208.73 -45.08 131.25 220.29
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 9.840e+00 6.385e-04 15412 <2e-16 ***
## x.var 1.283e-02 3.823e-06 3356 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 20398879 on 221 degrees of freedom
## Residual deviance: 6907816 on 220 degrees of freedom
## AIC: 6910183
##
## Number of Fisher Scoring iterations: 6
##
## --------------------------------------------------------------------------------
## [[1]]
## [[1]][[1]]
## [[1]][[1]][[1]]
## list()
##
## [[1]][[1]][[2]]
## geo.loc Long 2020-01-22 2020-01-23 2020-01-24 2020-01-25 2020-01-26
## 1 GERMANY GERMANY 0 0 0 0 0
## 2020-01-27 2020-01-28 2020-01-29 2020-01-30 2020-01-31 2020-02-01 2020-02-02
## 1 1 4 4 4 5 8 10
## 2020-02-03 2020-02-04 2020-02-05 2020-02-06 2020-02-07 2020-02-08 2020-02-09
## 1 12 12 12 12 13 13 14
## 2020-02-10 2020-02-11 2020-02-12 2020-02-13 2020-02-14 2020-02-15 2020-02-16
## 1 14 16 16 16 16 16 16
## 2020-02-17 2020-02-18 2020-02-19 2020-02-20 2020-02-21 2020-02-22 2020-02-23
## 1 16 16 16 16 16 16 16
## 2020-02-24 2020-02-25 2020-02-26 2020-02-27 2020-02-28 2020-02-29 2020-03-01
## 1 16 17 27 46 48 79 130
## 2020-03-02 2020-03-03 2020-03-04 2020-03-05 2020-03-06 2020-03-07 2020-03-08
## 1 159 196 262 482 670 799 1040
## 2020-03-09 2020-03-10 2020-03-11 2020-03-12 2020-03-13 2020-03-14 2020-03-15
## 1 1176 1457 1908 2078 3675 4585 5795
## 2020-03-16 2020-03-17 2020-03-18 2020-03-19 2020-03-20 2020-03-21 2020-03-22
## 1 7272 9257 12327 15320 19848 22213 24873
## 2020-03-23 2020-03-24 2020-03-25 2020-03-26 2020-03-27 2020-03-28 2020-03-29
## 1 29056 32986 37323 43938 50871 57695 62095
## 2020-03-30 2020-03-31 2020-04-01 2020-04-02 2020-04-03 2020-04-04 2020-04-05
## 1 66885 71808 77872 84794 91159 96092 100123
## 2020-04-06 2020-04-07 2020-04-08 2020-04-09 2020-04-10 2020-04-11 2020-04-12
## 1 103374 107663 113296 118181 122171 124908 127854
## 2020-04-13 2020-04-14 2020-04-15 2020-04-16 2020-04-17 2020-04-18 2020-04-19
## 1 130072 131359 134753 137698 141397 143342 145184
## 2020-04-20 2020-04-21 2020-04-22 2020-04-23 2020-04-24 2020-04-25 2020-04-26
## 1 147065 148291 150648 153129 154999 156513 157770
## 2020-04-27 2020-04-28 2020-04-29 2020-04-30 2020-05-01 2020-05-02 2020-05-03
## 1 158758 159912 161539 163009 164077 164967 165664
## 2020-05-04 2020-05-05 2020-05-06 2020-05-07 2020-05-08 2020-05-09 2020-05-10
## 1 166152 167007 168162 169430 170588 171324 171879
## 2020-05-11 2020-05-12 2020-05-13 2020-05-14 2020-05-15 2020-05-16 2020-05-17
## 1 172576 173171 174098 174478 175233 175752 176369
## 2020-05-18 2020-05-19 2020-05-20 2020-05-21 2020-05-22 2020-05-23 2020-05-24
## 1 176551 177778 178473 179021 179710 179986 180328
## 2020-05-25 2020-05-26 2020-05-27 2020-05-28 2020-05-29 2020-05-30 2020-05-31
## 1 180600 181200 181524 182196 182922 183189 183410
## 2020-06-01 2020-06-02 2020-06-03 2020-06-04 2020-06-05 2020-06-06 2020-06-07
## 1 183594 183879 184121 184472 184924 185450 185750
## 2020-06-08 2020-06-09 2020-06-10 2020-06-11 2020-06-12 2020-06-13 2020-06-14
## 1 186109 186506 186522 186691 187226 187267 187518
## 2020-06-15 2020-06-16 2020-06-17 2020-06-18 2020-06-19 2020-06-20 2020-06-21
## 1 187682 188252 188604 189817 190299 190670 191272
## 2020-06-22 2020-06-23 2020-06-24 2020-06-25 2020-06-26 2020-06-27 2020-06-28
## 1 191768 192480 192871 193371 194036 194458 194693
## 2020-06-29 2020-06-30 2020-07-01 2020-07-02 2020-07-03 2020-07-04 2020-07-05
## 1 195042 195418 195893 196370 196780 197198 197523
## 2020-07-06 2020-07-07 2020-07-08 2020-07-09 2020-07-10 2020-07-11 2020-07-12
## 1 198064 198343 198699 199001 199332 199709 199919
## 2020-07-13 2020-07-14 2020-07-15 2020-07-16 2020-07-17 2020-07-18 2020-07-19
## 1 200180 200456 200890 201450 202045 202426 202735
## 2020-07-20 2020-07-21 2020-07-22 2020-07-23 2020-07-24 2020-07-25 2020-07-26
## 1 203325 203717 204276 204881 205623 206278 206667
## 2020-07-27 2020-07-28 2020-07-29 2020-07-30 2020-07-31 2020-08-01 2020-08-02
## 1 207112 207707 208546 209535 210399 211005 211220
## 2020-08-03 2020-08-04 2020-08-05 2020-08-06 2020-08-07 2020-08-08 2020-08-09
## 1 212111 212828 214113 215039 216196 216903 217288
## 2020-08-10 2020-08-11 2020-08-12 2020-08-13 2020-08-14 2020-08-15 2020-08-16
## 1 218508 219540 220859 222281 223791 224488 225007
## 2020-08-17 2020-08-18 2020-08-19 2020-08-20 2020-08-21 2020-08-22 2020-08-23
## 1 226700 228120 229706 231292 233029 233861 234494
## 2020-08-24 2020-08-25 2020-08-26 2020-08-27 2020-08-28 2020-08-29 NA
## 1 236122 237583 239010 240571 242126 242835 243305
## NA
## 1 243305
##
##
## [[1]][[2]]
## geo.loc Long 2020-01-22 2020-01-23 2020-01-24 2020-01-25 2020-01-26
## 1 GERMANY GERMANY 0 0 0 0 0
## 2020-01-27 2020-01-28 2020-01-29 2020-01-30 2020-01-31 2020-02-01 2020-02-02
## 1 0 0 0 0 0 0 0
## 2020-02-03 2020-02-04 2020-02-05 2020-02-06 2020-02-07 2020-02-08 2020-02-09
## 1 0 0 0 0 0 0 0
## 2020-02-10 2020-02-11 2020-02-12 2020-02-13 2020-02-14 2020-02-15 2020-02-16
## 1 0 0 0 0 0 0 0
## 2020-02-17 2020-02-18 2020-02-19 2020-02-20 2020-02-21 2020-02-22 2020-02-23
## 1 0 0 0 0 0 0 0
## 2020-02-24 2020-02-25 2020-02-26 2020-02-27 2020-02-28 2020-02-29 2020-03-01
## 1 0 0 0 0 0 0 0
## 2020-03-02 2020-03-03 2020-03-04 2020-03-05 2020-03-06 2020-03-07 2020-03-08
## 1 0 0 0 0 0 0 0
## 2020-03-09 2020-03-10 2020-03-11 2020-03-12 2020-03-13 2020-03-14 2020-03-15
## 1 2 2 3 3 7 9 11
## 2020-03-16 2020-03-17 2020-03-18 2020-03-19 2020-03-20 2020-03-21 2020-03-22
## 1 17 24 28 44 67 84 94
## 2020-03-23 2020-03-24 2020-03-25 2020-03-26 2020-03-27 2020-03-28 2020-03-29
## 1 123 157 206 267 342 433 533
## 2020-03-30 2020-03-31 2020-04-01 2020-04-02 2020-04-03 2020-04-04 2020-04-05
## 1 645 775 920 1107 1275 1444 1584
## 2020-04-06 2020-04-07 2020-04-08 2020-04-09 2020-04-10 2020-04-11 2020-04-12
## 1 1810 2016 2349 2607 2767 2736 3022
## 2020-04-13 2020-04-14 2020-04-15 2020-04-16 2020-04-17 2020-04-18 2020-04-19
## 1 3194 3294 3804 4052 4352 4459 4586
## 2020-04-20 2020-04-21 2020-04-22 2020-04-23 2020-04-24 2020-04-25 2020-04-26
## 1 4862 5033 5279 5575 5760 5877 5976
## 2020-04-27 2020-04-28 2020-04-29 2020-04-30 2020-05-01 2020-05-02 2020-05-03
## 1 6126 6314 6467 6623 6736 6812 6866
## 2020-05-04 2020-05-05 2020-05-06 2020-05-07 2020-05-08 2020-05-09 2020-05-10
## 1 6993 6993 7275 7392 7510 7549 7569
## 2020-05-11 2020-05-12 2020-05-13 2020-05-14 2020-05-15 2020-05-16 2020-05-17
## 1 7661 7738 7861 7884 7897 7938 7962
## 2020-05-18 2020-05-19 2020-05-20 2020-05-21 2020-05-22 2020-05-23 2020-05-24
## 1 8003 8081 8144 8203 8228 8261 8283
## 2020-05-25 2020-05-26 2020-05-27 2020-05-28 2020-05-29 2020-05-30 2020-05-31
## 1 8309 8372 8428 8470 8504 8530 8540
## 2020-06-01 2020-06-02 2020-06-03 2020-06-04 2020-06-05 2020-06-06 2020-06-07
## 1 8555 8563 8602 8635 8658 8673 8685
## 2020-06-08 2020-06-09 2020-06-10 2020-06-11 2020-06-12 2020-06-13 2020-06-14
## 1 8695 8736 8752 8772 8783 8793 8801
## 2020-06-15 2020-06-16 2020-06-17 2020-06-18 2020-06-19 2020-06-20 2020-06-21
## 1 8807 8820 8851 8875 8887 8895 8895
## 2020-06-22 2020-06-23 2020-06-24 2020-06-25 2020-06-26 2020-06-27 2020-06-28
## 1 8899 8914 8928 8940 8965 8968 8968
## 2020-06-29 2020-06-30 2020-07-01 2020-07-02 2020-07-03 2020-07-04 2020-07-05
## 1 8976 8990 8995 9006 9010 9020 9023
## 2020-07-06 2020-07-07 2020-07-08 2020-07-09 2020-07-10 2020-07-11 2020-07-12
## 1 9022 9032 9046 9057 9063 9070 9071
## 2020-07-13 2020-07-14 2020-07-15 2020-07-16 2020-07-17 2020-07-18 2020-07-19
## 1 9074 9078 9080 9087 9088 9091 9092
## 2020-07-20 2020-07-21 2020-07-22 2020-07-23 2020-07-24 2020-07-25 2020-07-26
## 1 9094 9099 9102 9110 9120 9124 9124
## 2020-07-27 2020-07-28 2020-07-29 2020-07-30 2020-07-31 2020-08-01 2020-08-02
## 1 9125 9131 9135 9144 9147 9154 9154
## 2020-08-03 2020-08-04 2020-08-05 2020-08-06 2020-08-07 2020-08-08 2020-08-09
## 1 9154 9163 9179 9181 9195 9201 9202
## 2020-08-10 2020-08-11 2020-08-12 2020-08-13 2020-08-14 2020-08-15 2020-08-16
## 1 9203 9208 9213 9217 9230 9235 9235
## 2020-08-17 2020-08-18 2020-08-19 2020-08-20 2020-08-21 2020-08-22 2020-08-23
## 1 9236 9241 9249 9263 9266 9272 9275
## 2020-08-24 2020-08-25 2020-08-26 2020-08-27 2020-08-28 2020-08-29 NA NA
## 1 9276 9281 9285 9290 9290 9299 9300 9300
##
##
## [[2]]
## geo.loc Long 2020-01-22 2020-01-23 2020-01-24 2020-01-25 2020-01-26
## 1 GERMANY GERMANY 0 0 0 0 0
## 2020-01-27 2020-01-28 2020-01-29 2020-01-30 2020-01-31 2020-02-01 2020-02-02
## 1 0 0 0 0 0 0 0
## 2020-02-03 2020-02-04 2020-02-05 2020-02-06 2020-02-07 2020-02-08 2020-02-09
## 1 0 0 0 0 0 0 0
## 2020-02-10 2020-02-11 2020-02-12 2020-02-13 2020-02-14 2020-02-15 2020-02-16
## 1 0 0 0 1 1 1 1
## 2020-02-17 2020-02-18 2020-02-19 2020-02-20 2020-02-21 2020-02-22 2020-02-23
## 1 1 12 12 12 14 14 14
## 2020-02-24 2020-02-25 2020-02-26 2020-02-27 2020-02-28 2020-02-29 2020-03-01
## 1 14 14 15 16 16 16 16
## 2020-03-02 2020-03-03 2020-03-04 2020-03-05 2020-03-06 2020-03-07 2020-03-08
## 1 16 16 16 16 17 18 18
## 2020-03-09 2020-03-10 2020-03-11 2020-03-12 2020-03-13 2020-03-14 2020-03-15
## 1 18 18 25 25 46 46 46
## 2020-03-16 2020-03-17 2020-03-18 2020-03-19 2020-03-20 2020-03-21 2020-03-22
## 1 67 67 105 113 180 233 266
## 2020-03-23 2020-03-24 2020-03-25 2020-03-26 2020-03-27 2020-03-28 2020-03-29
## 1 266 3243 3547 5673 6658 8481 9211
## 2020-03-30 2020-03-31 2020-04-01 2020-04-02 2020-04-03 2020-04-04 2020-04-05
## 1 13500 16100 18700 22440 24575 26400 28700
## 2020-04-06 2020-04-07 2020-04-08 2020-04-09 2020-04-10 2020-04-11 2020-04-12
## 1 28700 36081 46300 52407 53913 57400 60300
## 2020-04-13 2020-04-14 2020-04-15 2020-04-16 2020-04-17 2020-04-18 2020-04-19
## 1 64300 68200 72600 77000 83114 85400 88000
## 2020-04-20 2020-04-21 2020-04-22 2020-04-23 2020-04-24 2020-04-25 2020-04-26
## 1 91500 95200 99400 103300 109800 109800 112000
## 2020-04-27 2020-04-28 2020-04-29 2020-04-30 2020-05-01 2020-05-02 2020-05-03
## 1 114500 117400 120400 123500 126900 129000 130600
## 2020-05-04 2020-05-05 2020-05-06 2020-05-07 2020-05-08 2020-05-09 2020-05-10
## 1 132700 135100 139900 141700 141700 143300 144400
## 2020-05-11 2020-05-12 2020-05-13 2020-05-14 2020-05-15 2020-05-16 2020-05-17
## 1 145617 147200 148700 150300 151597 152600 154011
## 2020-05-18 2020-05-19 2020-05-20 2020-05-21 2020-05-22 2020-05-23 2020-05-24
## 1 155041 155681 156966 158087 159064 159716 160281
## 2020-05-25 2020-05-26 2020-05-27 2020-05-28 2020-05-29 2020-05-30 2020-05-31
## 1 161199 161967 162820 163360 164245 164908 165352
## 2020-06-01 2020-06-02 2020-06-03 2020-06-04 2020-06-05 2020-06-06 2020-06-07
## 1 165632 166609 167453 167909 168480 168958 169224
## 2020-06-08 2020-06-09 2020-06-10 2020-06-11 2020-06-12 2020-06-13 2020-06-14
## 1 169556 170129 170630 170961 171535 171970 172089
## 2020-06-15 2020-06-16 2020-06-17 2020-06-18 2020-06-19 2020-06-20 2020-06-21
## 1 172692 172842 173599 173847 173972 174609 174740
## 2020-06-22 2020-06-23 2020-06-24 2020-06-25 2020-06-26 2020-06-27 2020-06-28
## 1 175143 175825 176422 176764 177149 177518 177657
## 2020-06-29 2020-06-30 2020-07-01 2020-07-02 2020-07-03 2020-07-04 2020-07-05
## 1 177770 178100 179100 179800 180300 181000 181719
## 2020-07-06 2020-07-07 2020-07-08 2020-07-09 2020-07-10 2020-07-11 2020-07-12
## 1 182160 182661 183153 183728 184028 184266 184414
## 2020-07-13 2020-07-14 2020-07-15 2020-07-16 2020-07-17 2020-07-18 2020-07-19
## 1 185100 185100 186000 186400 186900 187200 187400
## 2020-07-20 2020-07-21 2020-07-22 2020-07-23 2020-07-24 2020-07-25 2020-07-26
## 1 188070 188221 188628 189140 189696 189919 190055
## 2020-07-27 2020-07-28 2020-07-29 2020-07-30 2020-07-31 2020-08-01 2020-08-02
## 1 190314 190711 191279 191551 191992 192636 192908
## 2020-08-03 2020-08-04 2020-08-05 2020-08-06 2020-08-07 2020-08-08 2020-08-09
## 1 193594 194173 194568 195281 195935 196550 196783
## 2020-08-10 2020-08-11 2020-08-12 2020-08-13 2020-08-14 2020-08-15 2020-08-16
## 1 197382 198347 198991 199654 200440 200756 201187
## 2020-08-17 2020-08-18 2020-08-19 2020-08-20 2020-08-21 2020-08-22 2020-08-23
## 1 202249 203677 204454 205359 206656 207606 207985
## 2020-08-24 2020-08-25 2020-08-26 2020-08-27 2020-08-28 2020-08-29 NA
## 1 208653 210333 211691 212909 214186 214790 215283
## NA
## 1 215283
Total for death cases for “ALL” the regions
Read time series data for confirmed cases
Compute changes and growth rates per location for all the countries
Compute changes and growth rates per location for ‘India’ and ‘Germany’
growth.rate(TS.data,geo.loc=c("India","Germany"))
## [1] "INDIA"
## [1] "GERMANY"
## Processing... INDIA
## Processing... GERMANY
## Loading required package: pheatmap
## Loading required package: gplots
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
## $Changes
## geo.loc 2020-01-23 2020-01-24 2020-01-25 2020-01-26 2020-01-27 2020-01-28
## 1 INDIA 0 0 0 0 0 0
## 2 GERMANY 0 0 0 0 1 3
## 2020-01-29 2020-01-30 2020-01-31 2020-02-01 2020-02-02 2020-02-03 2020-02-04
## 1 0 1 0 0 1 1 0
## 2 0 0 1 3 2 2 0
## 2020-02-05 2020-02-06 2020-02-07 2020-02-08 2020-02-09 2020-02-10 2020-02-11
## 1 0 0 0 0 0 0 0
## 2 0 0 1 0 1 0 2
## 2020-02-12 2020-02-13 2020-02-14 2020-02-15 2020-02-16 2020-02-17 2020-02-18
## 1 0 0 0 0 0 0 0
## 2 0 0 0 0 0 0 0
## 2020-02-19 2020-02-20 2020-02-21 2020-02-22 2020-02-23 2020-02-24 2020-02-25
## 1 0 0 0 0 0 0 0
## 2 0 0 0 0 0 0 1
## 2020-02-26 2020-02-27 2020-02-28 2020-02-29 2020-03-01 2020-03-02 2020-03-03
## 1 0 0 0 0 0 2 0
## 2 10 19 2 31 51 29 37
## 2020-03-04 2020-03-05 2020-03-06 2020-03-07 2020-03-08 2020-03-09 2020-03-10
## 1 23 2 1 3 5 4 13
## 2 66 220 188 129 241 136 281
## 2020-03-11 2020-03-12 2020-03-13 2020-03-14 2020-03-15 2020-03-16 2020-03-17
## 1 6 11 9 20 11 6 23
## 2 451 170 1597 910 1210 1477 1985
## 2020-03-18 2020-03-19 2020-03-20 2020-03-21 2020-03-22 2020-03-23 2020-03-24
## 1 14 38 50 86 66 103 37
## 2 3070 2993 4528 2365 2660 4183 3930
## 2020-03-25 2020-03-26 2020-03-27 2020-03-28 2020-03-29 2020-03-30 2020-03-31
## 1 121 70 160 100 37 227 146
## 2 4337 6615 6933 6824 4400 4790 4923
## 2020-04-01 2020-04-02 2020-04-03 2020-04-04 2020-04-05 2020-04-06 2020-04-07
## 1 601 545 24 515 506 1190 533
## 2 6064 6922 6365 4933 4031 3251 4289
## 2020-04-08 2020-04-09 2020-04-10 2020-04-11 2020-04-12 2020-04-13 2020-04-14
## 1 605 809 873 848 759 1248 1034
## 2 5633 4885 3990 2737 2946 2218 1287
## 2020-04-15 2020-04-16 2020-04-17 2020-04-18 2020-04-19 2020-04-20 2020-04-21
## 1 835 1108 922 1370 1893 924 1541
## 2 3394 2945 3699 1945 1842 1881 1226
## 2020-04-22 2020-04-23 2020-04-24 2020-04-25 2020-04-26 2020-04-27 2020-04-28
## 1 1290 1707 1453 1753 1607 1561 1873
## 2 2357 2481 1870 1514 1257 988 1154
## 2020-04-29 2020-04-30 2020-05-01 2020-05-02 2020-05-03 2020-05-04 2020-05-05
## 1 1738 1801 2394 2442 2806 3932 2963
## 2 1627 1470 1068 890 697 488 855
## 2020-05-06 2020-05-07 2020-05-08 2020-05-09 2020-05-10 2020-05-11 2020-05-12
## 1 3587 3364 3344 3113 4353 3607 3524
## 2 1155 1268 1158 736 555 697 595
## 2020-05-13 2020-05-14 2020-05-15 2020-05-16 2020-05-17 2020-05-18 2020-05-19
## 1 3763 3942 3787 4864 5050 4630 6147
## 2 927 380 755 519 617 182 1227
## 2020-05-20 2020-05-21 2020-05-22 2020-05-23 2020-05-24 2020-05-25 2020-05-26
## 1 5553 6198 6568 6629 7113 6414 5843
## 2 695 548 689 276 342 272 600
## 2020-05-27 2020-05-28 2020-05-29 2020-05-30 2020-05-31 2020-06-01 2020-06-02
## 1 7293 7300 8105 8336 8782 7761 8821
## 2 324 672 726 267 221 184 285
## 2020-06-03 2020-06-04 2020-06-05 2020-06-06 2020-06-07 2020-06-08 2020-06-09
## 1 9633 9889 9471 10438 10864 8442 10218
## 2 242 351 452 526 300 359 397
## 2020-06-10 2020-06-11 2020-06-12 2020-06-13 2020-06-14 2020-06-15 2020-06-16
## 1 10459 10930 11458 11929 11502 10667 10974
## 2 16 169 535 41 251 164 570
## 2020-06-17 2020-06-18 2020-06-19 2020-06-20 2020-06-21 2020-06-22 2020-06-23
## 1 12881 13586 14516 15403 14831 14933 15968
## 2 352 1213 482 371 602 496 712
## 2020-06-24 2020-06-25 2020-06-26 2020-06-27 2020-06-28 2020-06-29 2020-06-30
## 1 16922 17296 18552 19906 19459 18522 18641
## 2 391 500 665 422 235 349 376
## 2020-07-01 2020-07-02 2020-07-03 2020-07-04 2020-07-05 2020-07-06 2020-07-07
## 1 19160 20903 22771 24850 24248 22251 22753
## 2 475 477 410 418 325 541 279
## 2020-07-08 2020-07-09 2020-07-10 2020-07-11 2020-07-12 2020-07-13 2020-07-14
## 1 24879 26506 27114 28606 28732 28498 29429
## 2 356 302 331 377 210 261 276
## 2020-07-15 2020-07-16 2020-07-17 2020-07-18 2020-07-19 2020-07-20 2020-07-21
## 1 32676 34975 35252 38697 40425 37132 37740
## 2 434 560 595 381 309 590 392
## 2020-07-22 2020-07-23 2020-07-24 2020-07-25 2020-07-26 2020-07-27 2020-07-28
## 1 45720 49310 48916 48611 49981 44457 51596
## 2 559 605 742 655 389 445 595
## 2020-07-29 2020-07-30 2020-07-31 2020-08-01 2020-08-02 2020-08-03 2020-08-04
## 1 50294 52783 61242 54735 52972 52050 52509
## 2 839 989 864 606 215 891 717
## 2020-08-05 2020-08-06 2020-08-07 2020-08-08 2020-08-09 2020-08-10 2020-08-11
## 1 56282 62538 61537 64399 62064 53601 60963
## 2 1285 926 1157 707 385 1220 1032
## 2020-08-12 2020-08-13 2020-08-14 2020-08-15 2020-08-16 2020-08-17 2020-08-18
## 1 66999 64553 64732 64030 57711 55018 64572
## 2 1319 1422 1510 697 519 1693 1420
## 2020-08-19 2020-08-20 2020-08-21 2020-08-22 2020-08-23 2020-08-24 2020-08-25
## 1 69672 68900 69876 69239 61408 60975 57224
## 2 1586 1586 1737 832 633 1628 1461
## 2020-08-26 2020-08-27 2020-08-28 2020-08-29 2020-08-30
## 1 85687 77266 76472 78761 78512
## 2 1427 1561 1555 709 470
##
## $Growth.Rate
## geo.loc 2020-01-24 2020-01-25 2020-01-26 2020-01-27 2020-01-28 2020-01-29
## 1 INDIA NaN NaN NaN NaN NaN NaN
## 2 GERMANY NaN NaN NaN NA 3 0
## 2020-01-30 2020-01-31 2020-02-01 2020-02-02 2020-02-03 2020-02-04 2020-02-05
## 1 NA 0 NaN NA 1 0 NaN
## 2 NaN NA 3 0.6666667 1 0 NaN
## 2020-02-06 2020-02-07 2020-02-08 2020-02-09 2020-02-10 2020-02-11 2020-02-12
## 1 NaN NaN NaN NaN NaN NaN NaN
## 2 NaN NA 0 NA 0 NA 0
## 2020-02-13 2020-02-14 2020-02-15 2020-02-16 2020-02-17 2020-02-18 2020-02-19
## 1 NaN NaN NaN NaN NaN NaN NaN
## 2 NaN NaN NaN NaN NaN NaN NaN
## 2020-02-20 2020-02-21 2020-02-22 2020-02-23 2020-02-24 2020-02-25 2020-02-26
## 1 NaN NaN NaN NaN NaN NaN NaN
## 2 NaN NaN NaN NaN NaN NA 10
## 2020-02-27 2020-02-28 2020-02-29 2020-03-01 2020-03-02 2020-03-03 2020-03-04
## 1 NaN NaN NaN NaN NA 0.000000 NA
## 2 1.9 0.1052632 15.5 1.645161 0.5686275 1.275862 1.783784
## 2020-03-05 2020-03-06 2020-03-07 2020-03-08 2020-03-09 2020-03-10 2020-03-11
## 1 0.08695652 0.5000000 3.0000000 1.666667 0.8000000 3.250000 0.4615385
## 2 3.33333333 0.8545455 0.6861702 1.868217 0.5643154 2.066176 1.6049822
## 2020-03-12 2020-03-13 2020-03-14 2020-03-15 2020-03-16 2020-03-17 2020-03-18
## 1 1.8333333 0.8181818 2.2222222 0.55000 0.5454545 3.833333 0.6086957
## 2 0.3769401 9.3941176 0.5698184 1.32967 1.2206612 1.343940 1.5465995
## 2020-03-19 2020-03-20 2020-03-21 2020-03-22 2020-03-23 2020-03-24 2020-03-25
## 1 2.7142857 1.315789 1.7200000 0.7674419 1.560606 0.3592233 3.270270
## 2 0.9749186 1.512863 0.5223057 1.1247357 1.572556 0.9395171 1.103562
## 2020-03-26 2020-03-27 2020-03-28 2020-03-29 2020-03-30 2020-03-31 2020-04-01
## 1 0.5785124 2.285714 0.6250000 0.3700000 6.135135 0.6431718 4.116438
## 2 1.5252479 1.048073 0.9842781 0.6447831 1.088636 1.0277662 1.231769
## 2020-04-02 2020-04-03 2020-04-04 2020-04-05 2020-04-06 2020-04-07 2020-04-08
## 1 0.906822 0.0440367 21.4583333 0.9825243 2.3517787 0.4478992 1.135084
## 2 1.141491 0.9195319 0.7750196 0.8171498 0.8064996 1.3192864 1.313360
## 2020-04-09 2020-04-10 2020-04-11 2020-04-12 2020-04-13 2020-04-14 2020-04-15
## 1 1.3371901 1.0791100 0.9713631 0.8950472 1.6442688 0.8285256 0.8075435
## 2 0.8672111 0.8167861 0.6859649 1.0763610 0.7528853 0.5802525 2.6371406
## 2020-04-16 2020-04-17 2020-04-18 2020-04-19 2020-04-20 2020-04-21 2020-04-22
## 1 1.3269461 0.832130 1.4859002 1.3817518 0.4881141 1.667749 0.8371188
## 2 0.8677077 1.256027 0.5258178 0.9470437 1.0211726 0.651781 1.9225122
## 2020-04-23 2020-04-24 2020-04-25 2020-04-26 2020-04-27 2020-04-28 2020-04-29
## 1 1.323256 0.8512009 1.2064694 0.9167142 0.9713752 1.199872 0.9279231
## 2 1.052609 0.7537283 0.8096257 0.8302510 0.7859984 1.168016 1.4098787
## 2020-04-30 2020-05-01 2020-05-02 2020-05-03 2020-05-04 2020-05-05 2020-05-06
## 1 1.0362486 1.3292615 1.0200501 1.1490581 1.4012830 0.7535605 1.210597
## 2 0.9035034 0.7265306 0.8333333 0.7831461 0.7001435 1.7520492 1.350877
## 2020-05-07 2020-05-08 2020-05-09 2020-05-10 2020-05-11 2020-05-12 2020-05-13
## 1 0.9378311 0.9940547 0.9309211 1.3983296 0.8286239 0.9769892 1.067821
## 2 1.0978355 0.9132492 0.6355786 0.7540761 1.2558559 0.8536585 1.557983
## 2020-05-14 2020-05-15 2020-05-16 2020-05-17 2020-05-18 2020-05-19 2020-05-20
## 1 1.0475684 0.9606799 1.2843940 1.038240 0.9168317 1.327646 0.9033675
## 2 0.4099245 1.9868421 0.6874172 1.188825 0.2949757 6.741758 0.5664222
## 2020-05-21 2020-05-22 2020-05-23 2020-05-24 2020-05-25 2020-05-26 2020-05-27
## 1 1.1161534 1.059697 1.0092875 1.073013 0.9017292 0.910976 1.24816
## 2 0.7884892 1.257299 0.4005806 1.239130 0.7953216 2.205882 0.54000
## 2020-05-28 2020-05-29 2020-05-30 2020-05-31 2020-06-01 2020-06-02 2020-06-03
## 1 1.000960 1.110274 1.0285009 1.0535029 0.8837395 1.136580 1.0920531
## 2 2.074074 1.080357 0.3677686 0.8277154 0.8325792 1.548913 0.8491228
## 2020-06-04 2020-06-05 2020-06-06 2020-06-07 2020-06-08 2020-06-09 2020-06-10
## 1 1.026575 0.9577308 1.102101 1.0408124 0.7770619 1.210377 1.02358583
## 2 1.450413 1.2877493 1.163717 0.5703422 1.1966667 1.105850 0.04030227
## 2020-06-11 2020-06-12 2020-06-13 2020-06-14 2020-06-15 2020-06-16 2020-06-17
## 1 1.045033 1.048307 1.04110665 0.9642049 0.9274039 1.02878 1.1737744
## 2 10.562500 3.165680 0.07663551 6.1219512 0.6533865 3.47561 0.6175439
## 2020-06-18 2020-06-19 2020-06-20 2020-06-21 2020-06-22 2020-06-23 2020-06-24
## 1 1.054732 1.0684528 1.0611050 0.9628644 1.0068775 1.069310 1.0597445
## 2 3.446023 0.3973619 0.7697095 1.6226415 0.8239203 1.435484 0.5491573
## 2020-06-25 2020-06-26 2020-06-27 2020-06-28 2020-06-29 2020-06-30 2020-07-01
## 1 1.022101 1.072618 1.0729840 0.9775445 0.9518475 1.006425 1.027842
## 2 1.278772 1.330000 0.6345865 0.5568720 1.4851064 1.077364 1.263298
## 2020-07-02 2020-07-03 2020-07-04 2020-07-05 2020-07-06 2020-07-07 2020-07-08
## 1 1.090971 1.0893652 1.091300 0.9757746 0.9176427 1.0225608 1.093438
## 2 1.004211 0.8595388 1.019512 0.7775120 1.6646154 0.5157116 1.275986
## 2020-07-09 2020-07-10 2020-07-11 2020-07-12 2020-07-13 2020-07-14 2020-07-15
## 1 1.0653965 1.022938 1.055027 1.0044047 0.9918558 1.032669 1.110333
## 2 0.8483146 1.096026 1.138973 0.5570292 1.2428571 1.057471 1.572464
## 2020-07-16 2020-07-17 2020-07-18 2020-07-19 2020-07-20 2020-07-21 2020-07-22
## 1 1.070357 1.00792 1.0977250 1.0446546 0.9185405 1.0163740 1.211447
## 2 1.290323 1.06250 0.6403361 0.8110236 1.9093851 0.6644068 1.426020
## 2020-07-23 2020-07-24 2020-07-25 2020-07-26 2020-07-27 2020-07-28 2020-07-29
## 1 1.078521 0.9920097 0.9937648 1.0281829 0.889478 1.160582 0.9747655
## 2 1.082290 1.2264463 0.8827493 0.5938931 1.143959 1.337079 1.4100840
## 2020-07-30 2020-07-31 2020-08-01 2020-08-02 2020-08-03 2020-08-04 2020-08-05
## 1 1.049489 1.1602599 0.8937494 0.9677903 0.9825946 1.0088184 1.071854
## 2 1.178784 0.8736097 0.7013889 0.3547855 4.1441860 0.8047138 1.792190
## 2020-08-06 2020-08-07 2020-08-08 2020-08-09 2020-08-10 2020-08-11 2020-08-12
## 1 1.1111545 0.9839937 1.0465086 0.9637417 0.8636408 1.1373482 1.099011
## 2 0.7206226 1.2494600 0.6110631 0.5445545 3.1688312 0.8459016 1.278101
## 2020-08-13 2020-08-14 2020-08-15 2020-08-16 2020-08-17 2020-08-18 2020-08-19
## 1 0.963492 1.002773 0.9891553 0.9013119 0.9533365 1.1736523 1.078982
## 2 1.078089 1.061885 0.4615894 0.7446198 3.2620424 0.8387478 1.116901
## 2020-08-20 2020-08-21 2020-08-22 2020-08-23 2020-08-24 2020-08-25 2020-08-26
## 1 0.9889195 1.014165 0.9908839 0.8868990 0.9929488 0.9384830 1.4973962
## 2 1.0000000 1.095208 0.4789868 0.7608173 2.5718799 0.8974201 0.9767283
## 2020-08-27 2020-08-28 2020-08-29 2020-08-30 NA
## 1 0.9017237 0.9897238 1.0299325 0.9968385 NA
## 2 1.0939033 0.9961563 0.4559486 0.6629055 NA
Obtain Time Series data
Explore different combinations of regions/cities/countries When combining different locations, heatmaps will also be generated comparing the trends among these locations
Retrieve time series data
Static and interactive plot
totals.plt(TS.data)
## Loading required package: plotly
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.0.2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
## Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
Totals for Germany, without displaying totals and one plot per page
totals.plt(TS.data, c("Germany"), with.totals=FALSE,one.plt.per.page=TRUE)
## [1] "GERMANY"
## Warning in par(new = TRUE): calling par(new=TRUE) with no plot
## A line object has been specified, but lines is not in the mode
## Adding lines to the mode...
totals.plt(TS.data, c("India"), with.totals=FALSE,one.plt.per.page=TRUE)
## [1] "INDIA"
## A line object has been specified, but lines is not in the mode
## Adding lines to the mode...
Totals for Germany, India; including global totals with the linear and semi-log plots arranged one next to the other
totals.plt(TS.data, c("Germany","India"), with.totals=TRUE,one.plt.per.page=FALSE)
## Warning in if (toupper(geo.loc0) != "ALL") {: the condition has length > 1 and
## only the first element will be used
## [1] "GERMANY"
## [1] "INDIA"
## A line object has been specified, but lines is not in the mode
## Adding lines to the mode...
## A line object has been specified, but lines is not in the mode
## Adding lines to the mode...
Totals for all the locations reported on the dataset, interactive plot will be saved as “totals-all.html”
totals.plt(TS.data, "ALL", fileName="totals-all")
# retrieve aggregated data
data <- covid19.data("aggregated")
Interactive map of aggregated cases – with more spatial resolution
live.map(data)
Interactive map of the time series data of thae confirmed cases with less spatial resolution, ie. aggregated by country
live.map(covid19.data("ts-confirmed"))
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## --------------------------------------------------------------------------------
Read time series data for confirmed cases
Run a SIR model for a given geographical location
generate.SIR.model(data,"Germany",tot.population=83149300)
## ################################################################################
## This is an experimental feature, being currently under active development!
## Please check the development version of the package for the latest updates on it
## ################################################################################
## [1] "GERMANY"
## Processing... GERMANY
## [1] 0 0 0 0 0 1 4 4 4 5
## [11] 8 10 12 12 12 12 13 13 14 14
## [21] 16 16 16 16 16 16 16 16 16 16
## [31] 16 16 16 16 17 27 46 48 79 130
## [41] 159 196 262 482 670 799 1040 1176 1457 1908
## [51] 2078 3675 4585 5795 7272 9257 12327 15320 19848 22213
## [61] 24873 29056 32986 37323 43938 50871 57695 62095 66885 71808
## [71] 77872 84794 91159 96092 100123 103374 107663 113296 118181 122171
## [81] 124908 127854 130072 131359 134753 137698 141397 143342 145184 147065
## [91] 148291 150648 153129 154999 156513 157770 158758 159912 161539 163009
## [101] 164077 164967 165664 166152 167007 168162 169430 170588 171324 171879
## [111] 172576 173171 174098 174478 175233 175752 176369 176551 177778 178473
## [121] 179021 179710 179986 180328 180600 181200 181524 182196 182922 183189
## [131] 183410 183594 183879 184121 184472 184924 185450 185750 186109 186506
## [141] 186522 186691 187226 187267 187518 187682 188252 188604 189817 190299
## [151] 190670 191272 191768 192480 192871 193371 194036 194458 194693 195042
## [161] 195418 195893 196370 196780 197198 197523 198064 198343 198699 199001
## [171] 199332 199709 199919 200180 200456 200890 201450 202045 202426 202735
## [181] 203325 203717 204276 204881 205623 206278 206667 207112 207707 208546
## [191] 209535 210399 211005 211220 212111 212828 214113 215039 216196 216903
## [201] 217288 218508 219540 220859 222281 223791 224488 225007 226700 228120
## [211] 229706 231292 233029 233861 234494 236122 237583 239010 240571 242126
## [221] 242835 243305
## [1] 36
## [1] 27 46 48 79 130 159 196 262 482 670 799 1040
## [13] 1176 1457 1908 2078 3675 4585 5795 7272 9257 12327 15320 19848
## [25] 22213 24873
## ------------------------ Parameters used to create model ------------------------
## Region: GERMANY
## Time interval to consider: t0=36 - t1= ; tfinal=90
## t0: 2020-02-27 -- t1:
## Number of days considered for initial guess: 26
## Fatality rate: 0.02
## Population of the region: 83149300
## --------------------------------------------------------------------------------
## Loading required package: deSolve
## [1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
## beta gamma
## 0.6398335 0.3601671
## R0 = 1.77649087472918
## Max nbr of infected: 9430798.58 ( 11.34 %)
## Max nbr of casualties, assuming 2% fatality rate: 188615.97
## Max reached at day : 53 ==> 2020-04-20
## ================================================================================
## $Infected
## [1] 27 46 48 79 130 159 196 262 482 670 799 1040
## [13] 1176 1457 1908 2078 3675 4585 5795 7272 9257 12327 15320 19848
## [25] 22213 24873
##
## $model
## time S I R
## 1 1 83149273 2.700000e+01 0.000000e+00
## 2 2 83149253 3.571258e+01 1.122047e+01
## 3 3 83149227 4.723660e+01 2.606164e+01
## 4 4 83149192 6.247927e+01 4.569189e+01
## 5 5 83149146 8.264057e+01 7.165661e+01
## 6 6 83149085 1.093076e+02 1.059997e+02
## 7 7 83149004 1.445796e+02 1.514250e+02
## 8 8 83148897 1.912333e+02 2.115083e+02
## 9 9 83148756 2.529412e+02 2.909796e+02
## 10 10 83148569 3.345609e+02 3.960949e+02
## 11 11 83148322 4.425171e+02 5.351290e+02
## 12 12 83147996 5.853073e+02 7.190265e+02
## 13 13 83147564 7.741705e+02 9.622632e+02
## 14 14 83146992 1.023971e+03 1.283985e+03
## 15 15 83146236 1.354367e+03 1.709516e+03
## 16 16 83145236 1.791357e+03 2.272347e+03
## 17 17 83143914 2.369323e+03 3.016773e+03
## 18 18 83142165 3.133726e+03 4.001377e+03
## 19 19 83139852 4.144682e+03 5.303629e+03
## 20 20 83136792 5.481665e+03 7.025976e+03
## 21 21 83132746 7.249732e+03 9.303882e+03
## 22 22 83127396 9.587729e+03 1.231646e+04
## 23 23 83120320 1.267912e+04 1.630047e+04
## 24 24 83110965 1.676621e+04 2.156890e+04
## 25 25 83098596 2.216893e+04 2.853530e+04
## 26 26 83082245 2.930940e+04 3.774604e+04
## 27 27 83060633 3.874415e+04 4.992262e+04
## 28 28 83032077 5.120613e+04 6.601731e+04
## 29 29 82994355 6.765934e+04 8.728614e+04
## 30 30 82944547 8.936927e+04 1.153842e+05
## 31 31 82878817 1.179932e+05 1.524900e+05
## 32 32 82792140 1.556942e+05 2.014660e+05
## 33 33 82677951 2.052836e+05 2.660658e+05
## 34 34 82527708 2.703939e+05 3.511980e+05
## 35 35 82330360 3.556823e+05 4.632572e+05
## 36 36 82071709 4.670573e+05 6.105340e+05
## 37 37 81733684 6.119088e+05 8.037068e+05
## 38 38 81293587 7.993003e+05 1.056413e+06
## 39 39 80723382 1.040049e+06 1.385869e+06
## 40 40 79989244 1.346568e+06 1.813487e+06
## 41 41 79051649 1.732293e+06 2.365358e+06
## 42 42 77866431 2.210447e+06 3.072422e+06
## 43 43 76387361 2.791898e+06 3.970041e+06
## 44 44 74570742 3.481959e+06 5.096600e+06
## 45 45 72382268 4.276247e+06 6.490785e+06
## 46 46 69805668 5.156334e+06 8.187298e+06
## 47 47 66851604 6.086538e+06 1.021116e+07
## 48 48 63564164 7.013795e+06 1.257134e+07
## 49 49 60021892 7.872222e+06 1.525519e+07
## 50 50 56331366 8.592577e+06 1.822536e+07
## 51 51 52613901 9.114587e+06 2.142081e+07
## 52 52 48988800 9.398318e+06 2.476218e+07
## 53 53 45558037 9.430799e+06 2.816046e+07
## 54 54 42396339 9.226022e+06 3.152694e+07
## 55 55 39548104 8.819214e+06 3.478198e+07
## 56 56 37030079 8.258043e+06 3.786118e+07
## 57 57 34837373 7.593758e+06 4.071817e+07
## 58 58 32950410 6.874266e+06 4.332462e+07
## 59 59 31341191 6.139918e+06 4.566819e+07
## 60 60 29978130 5.421772e+06 4.774940e+07
## 61 61 28829350 4.741672e+06 4.957828e+07
## 62 62 27864693 4.113376e+06 5.117123e+07
## 63 63 27056770 3.544138e+06 5.254839e+07
## 64 64 26381374 3.036341e+06 5.373158e+07
## 65 65 25817507 2.588959e+06 5.474283e+07
## 66 66 25347179 2.198752e+06 5.560337e+07
## 67 67 24955119 1.861188e+06 5.633299e+07
## 68 68 24628441 1.571110e+06 5.694975e+07
## 69 69 24356321 1.323199e+06 5.746978e+07
## 70 70 24129690 1.112276e+06 5.790733e+07
## 71 71 23940967 9.334862e+05 5.827485e+07
## 72 72 23783824 7.823965e+05 5.858308e+07
## 73 73 23652982 6.550373e+05 5.884128e+07
## 74 74 23544043 5.479054e+05 5.905735e+07
## 75 75 23453341 4.579442e+05 5.923802e+07
## 76 76 23377823 3.825097e+05 5.938897e+07
## 77 77 23314948 3.193316e+05 5.951502e+07
## 78 78 23262599 2.664706e+05 5.962023e+07
## 79 79 23219014 2.222781e+05 5.970801e+07
## 80 80 23182725 1.853579e+05 5.978122e+07
## 81 81 23152511 1.545307e+05 5.984226e+07
## 82 82 23127355 1.288030e+05 5.989314e+07
## 83 83 23106409 1.073398e+05 5.993555e+07
## 84 84 23088970 8.943988e+04 5.997089e+07
## 85 85 23074450 7.451583e+04 6.000033e+07
## 86 86 23062360 6.207568e+04 6.002486e+07
## 87 87 23052294 5.170798e+04 6.004530e+07
## 88 88 23043913 4.306881e+04 6.006232e+07
## 89 89 23036934 3.587092e+04 6.007649e+07
## 90 90 23031124 2.987452e+04 6.008830e+07
##
## $params
## $params$beta
## beta
## 0.6398335
##
## $params$gamma
## gamma
## 0.3601671
##
## $params$R0
## R0
## 1.776491
Modelling the spread for the whole world, storing the model and generating an interactive visualization
world.SIR.model <- generate.SIR.model(data,"ALL", t0=1,t1=15, tot.population=7.8e9, staticPlt=FALSE)
## ################################################################################
## This is an experimental feature, being currently under active development!
## Please check the development version of the package for the latest updates on it
## ################################################################################
## [1] "ALL"
## Processing... ALL
## [1] 555 654 941 1434 2118 2927 5578 6166 8234 9926 12038 16787
## [13] 19887 23898 27643
## ------------------------ Parameters used to create model ------------------------
## Region: ALL
## Time interval to consider: t0=1 - t1=15 ; tfinal=90
## t0: 2020-01-23 -- t1: 2020-02-06
## Number of days considered for initial guess: 15
## Fatality rate: 0.02
## Population of the region: 7.8e+09
## --------------------------------------------------------------------------------
## [1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
## beta gamma
## 0.6442089 0.3557911
## R0 = 1.81063807547213
## Max nbr of infected: 932010930.62 ( 11.95 %)
## Max nbr of casualties, assuming 2% fatality rate: 18640218.61
## Max reached at day : 57 ==> 2020-03-20
## ================================================================================
Plotting and visualizing the model
plt.SIR.model(world.SIR.model,"World",interactiveFig=TRUE,fileName="world.SIR.model")